home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / comm / tcp / SynCro1_3.lha / SynCro1_3 / SynCro.DOC < prev    next >
Encoding:
Text File  |  1995-02-02  |  12.5 KB  |  297 lines

  1.  
  2.                              SynCro v1.3
  3.  
  4.                       © 1994, 1995 Simon Dainty
  5.  
  6.                 Remote time-synchronization for AmiTCP
  7.  
  8. ======================================================================
  9.   Contents:                                              SynCro v1.3
  10. ======================================================================
  11.  
  12.   Introduction: What is...?                                      1.0
  13.  
  14.   SynCro:                                                        2.0
  15.     Installation ............................................... 2.1
  16.     How to...? ................................................. 2.2
  17.     Problems, problems ......................................... 2.3
  18.  
  19.   Legalities... damn:                                            3.0
  20.  
  21.   ...Forty Two:                                                  4.0
  22.     A word in your shell-like .................................. 4.1
  23.     Past, present and future ................................... 4.2
  24.  
  25. ======================================================================
  26.   Introduction: What is...?                              Chapter 1.0
  27. ======================================================================
  28.  
  29. There exists, as a  part of the  AmiTCP package, a mixed DOS and AREXX
  30. script named SynClock that allows you  to set your local time and date
  31. to that of  a remote  Internet-connected system.  SynCro  performs the
  32. exact same function as the  original  SynClock, but with one  distinct
  33. advantage: SynCro  was  written  in C; SynCro is  a stand-alone binary
  34. executable that can be made resident.
  35.  
  36.   SynCro has been fully tested with AmiTCP version 3.x beta, KickStart
  37. version 3.0 and  bsdsocket.library version 3; but it should work  with
  38. any version of the AmiTCP distribution and KickStart 2.0 and above (at
  39. least).  I'll be happy  to know of any problems  people may experience
  40. with regard to running  SynCro on anything  other than what I was able
  41. to test it on.
  42.  
  43. ======================================================================
  44.   SynCro:                                                Chapter 2.0
  45. ======================================================================
  46.  
  47. On startup, SynCro  will first perform  a check to see if AmiTCP is up
  48. and running.  Next, SynCro will attempt to access the 'daytime' socket
  49. of the  site that you have passed it  as an argument at the Shell.  If
  50. the attempt at accessing the port is a success then everything else is
  51. plain sailing.
  52.  
  53. ----------------------------------------------------------------------
  54.   SynCro: Installation.                                  Chapter 2.1
  55. ----------------------------------------------------------------------
  56.  
  57. SynCro is nothing  more  than a  standard AmigaDOS Shell  command, and
  58. with that it  can be placed anywhere you  deem fit.  Probably the best
  59. location to copy SynCro to is AmiTCP's 'bin' directory, if that is how
  60. your  AmiTCP hierarchy  is configured.  Otherwise  the C: directory is
  61. more than  adequate.  Placing SynCro somewhere within your path offers
  62. the obvious benefits.
  63.  
  64.   Alternatively, you may  wish to  make SynCro  resident.  This can be
  65. achieved by the normal method of using AmigaDOS's  'Resident' command.
  66. Making  SynCro  resident  isn't all  that  big  a deal  though, unless
  67. you're likely to be setting your machine time on a very regular basis.
  68. Still, the option is there if you ever need it.
  69.  
  70.   With respect to stack requirement, SynCro should work perfectly well
  71. with the default Shell stack size of 4096 bytes.
  72.  
  73. ----------------------------------------------------------------------
  74.   SynCro: How to...?                                     Chapter 2.2
  75. ----------------------------------------------------------------------
  76.  
  77. SynCro requires at least one argument in order to function  correctly:
  78. Either the  Fully Qualified Domain Name, or the IP address, of a site.
  79. All of  the valid command line arguments  that SynCro will  accept are
  80. listed below.
  81.  
  82.     SITE    - This argument is the only argument required by SynCro in
  83.               order for it to perform the desired task.  Any valid  IP
  84.               address or FQDN is acceptable here.
  85.  
  86.     SAVE    - If specified, SynCro  will save  the received  time  and
  87.               date to  a battery-backed clock, if such a clock exists.
  88.               If SynCro is  unable to access the battery-backed clock,
  89.               you may be notified.
  90.  
  91.     IGNORE  - SynCro will default to setting the local system clock to
  92.               that  of the remote time and date.  Calling  SynCro with
  93.               the IGNORE  switch set  will result in  no changes being
  94.               made to the local system time at all.
  95.  
  96.     QUIET   - Just as  it says, don't bother displaying any  output to
  97.               the  stdout.  By "any," I  mean  that  both the received
  98.               date and time, as well as any errors that may occur will
  99.               be suppressed.
  100.  
  101.   With exception  to the first obligatory  argument (the site), any of
  102. the three  remaining arguments may be supplied or ignored at the users
  103. discretion.  None of the arguments are mutually exclusive.
  104.  
  105.   What follows are several examples of SynCro usage:
  106.  
  107.   1) Examine  the current time of your  local machine (read the AmiTCP
  108.      documentation for  information regarding 'localhost'), but do not
  109.      set the system time to that of the received time.
  110.  
  111.      Shell> SynCro localhost IGNORE
  112.  
  113.   2) Set both the  system clock and  the internal battery-backed clock
  114.      to the time and date of the remote machine 'my.fave.remote.host'.
  115.      Any output will be suppressed.
  116.  
  117.      Shell> SynCro my.fave.remote.host SAVE QUIET
  118.  
  119.   3) Set the battery-backed clock time and  date to that of the remote
  120.      machine, but  don't set the  local system  clock.  I cannot think
  121.      of any  real reasons for wanting  to do this.
  122.  
  123.      Shell> SynCro my.fave.remote.host SAVE IGNORE
  124.  
  125.        If, after  receiving the  remote time and date, you wish to set
  126.      the  local time and  date, then it is simply a  matter of typing:
  127.      SETCLOCK LOAD at the Shell prompt.
  128.  
  129.   4) Set the  local system time and  date to that of the remote  site,
  130.      but suppress all output.  Nothing will be written to the battery-
  131.      backed clock.
  132.  
  133.      Shell> SynCro 255.255.255.255 QUIET
  134.  
  135. ----------------------------------------------------------------------
  136.   SynCro: Problems, problems.                            Chapter 2.3
  137. ----------------------------------------------------------------------
  138.  
  139. If, for  some  reason, SynCro is unable to  perform its  duty - if the
  140. remote host  can't be found for example, a specific  return code shall
  141. be met.  The value of  the return code relates  directly to a specific
  142. error within SynCro, these errors are listed below:
  143.  
  144.     21 - Incorrect command line arguments were passed.
  145.     22 - AmiTCP was not running prior to SynCro.
  146.     23 - SynCro couldn't open the bsdsocket.library.
  147.     24 - SynCro failed to connect to the given remote host.
  148.     25 - SynCro was  unable to connect  to the 'daytime' socket of the
  149.          remote host.
  150.     26 - For some reason, the battery-backed clock could not be found.
  151.  
  152. The  returning of  an error-specific return code  was a new feature of
  153. SynCro, for version 1.1.
  154.  
  155. ======================================================================
  156.   Legalities... damn:                                    Chapter 3.0
  157. ======================================================================
  158.  
  159. You use  SynCro completely  at your *own* risk, no  warranty is either
  160. expressed or implied.  I cannot (and will not) be held responsible for
  161. any damages caused by SynCro, no matter what the circumstance.  Either
  162. use this program  or ignore it, but don't blame me for  *any* unwanted
  163. results.  I've probably  spent more time  testing SynCro than actually
  164. coding it and  not  once has it misbehaved.  Hopefully  you too should
  165. experience a care-free service life.
  166.  
  167.   Although SynCro is freely  distributable, it still remains copyright
  168. 1994-5 Simon P. Dainty.  SynCro is definitely not Public Domain, it is
  169. freely distributable FreeWare - there is a difference.  Anyone wishing
  170. to obtain a copy has the right to a copy, for little or no charge.
  171.  
  172.   Whilst the continued distribution of SynCro is the author's goal, he
  173. hopes that you will conform to the following agreement:
  174.  
  175.   1) No files  are added to, or removed from, the archive with respect
  176.      to the original distribution, and no  files are modified relative
  177.      to their original state without the author's permission.
  178.  
  179.   2) No charge, other than the cost of media duplication, may be asked
  180.      for this package unless the situation of that charge falls within
  181.      item three (below).
  182.  
  183.   3) If  this package is to be  included as a part  of a commercial or
  184.      ShareWare  (or  variant) distribution, or magazine coverdisk, the
  185.      author would appreciate some form of prior notification.
  186.  
  187. If you  are a non-conformist, at least  make the  effort to appreciate
  188. what I've written above. =o)  Above all though, have fun.
  189.  
  190. ======================================================================
  191.   ...Forty Two:                                          Chapter 4.0
  192. ======================================================================
  193.  
  194. SynCro was written in C, with the aid of Matt Dillon's DICE C package.
  195. At a little over 3.5K  it is  not exactly big, but  for a simple Shell
  196. utility, it's not small either.
  197.  
  198.   Even though SynCro is freely distributable, I'd like you to think of
  199. it as  being "World-a-Ware".  If you  find SynCro to be useful, or you
  200. use  SynCro  for  any period of time, please do  a little something to
  201. help  the  environment of our home.  We are all ultimately responsible
  202. for world that we live in, and we are equally responsible for those we
  203. share it with.  We  only  have  the one  copy of Earth, and  without a
  204. back-up...
  205.  
  206. ----------------------------------------------------------------------
  207.   ...Forty Two: A word in your shell-like.               Chapter 4.1
  208. ----------------------------------------------------------------------
  209.  
  210. With respect to bug fixes, bug  reports, general  updates (if any) and
  211. pure talkability, I can  be contacted at any  of the addresses  listed
  212. below.  You will also find me lurking in most all of the Amiga related
  213. Usenet groups, specifically the  comp.sys.amiga.* groups as  well as a
  214. good few Amiga specific FidoNet and AmigaNet echos.
  215.  
  216.   Internet mailbox:
  217.  
  218.     syncro@ancient.demon.co.uk (Simon Dainty)
  219.  
  220.   Or,
  221.  
  222.     izzy@ancient.demon.co.uk (Simon Dainty)
  223.  
  224.   FidoNet and AmigaNet, via Dox's Amiga BBS (+44 01943 850340):
  225.  
  226.     2:250/320.3 (Simon Dainty)
  227.     39:138/14.3    "     "
  228.  
  229.   Snail mail:
  230.  
  231.     25, Victor Road,
  232.     Heaton,
  233.     Bradford,
  234.     West Yorkshire.
  235.     BD9 4QN.
  236.  
  237.   Electronic mail is my most preferred form of communication.
  238.  
  239.   SYL,
  240.  
  241.        Si.
  242.  
  243.  
  244.      "Breakin'  outta school an' we were  kickin' hard.  A lotta
  245.       good dreams an' a lotta false starts; We swore we wouldn't
  246.       get old before our time..." 
  247.                                   - Little Angels.
  248.  
  249. ----------------------------------------------------------------------
  250.   ...Forty Two: Past, present and future.                Chapter 4.2
  251. ----------------------------------------------------------------------
  252.  
  253.   29-Nov-94:  
  254.  
  255.   v1.0 - Initial release with no know bugs.  Limited distribution.
  256.  
  257.   02-Dec-94:
  258.  
  259.   v1.1 - Optimized executable compilation by utilizing inline library
  260.          calls.  Shaved off around 200 bytes from the binary.  
  261.  
  262.        - SynCro will return a specific code  in the event of an error.
  263.          Refer to chapter 2.3 for more information.
  264.  
  265.   02-Jan-95:
  266.  
  267.   v1.2 - Optimized executable size.  Now down to 4.8K.
  268.  
  269.        - Modified the ordering of the error-specific return codes into
  270.          something a little more logical.  Please refer to chapter 2.3
  271.          with respect to those changes.
  272.  
  273.        - Fixed a bug where SynCro would complain about an invalid FQDN
  274.          argument, when the argument was indeed valid.
  275.  
  276.   28-Jan-95:
  277.  
  278.   v1.3 - Optimized executable size.  Now down to 3.5K.
  279.  
  280.        - SynCro now goes directly  through the "bsdsocket.library", as
  281.          opposed to  earlier versions that used the TCP: device.  This
  282.          affords the user several benefits:
  283.  
  284.            * Not restricted to only giving an FQDN as the reference to
  285.              a remote site; SynCro will also accept an IP address.
  286.  
  287.            * No need to  mount the TCP: device if  SynCro was the only
  288.              program that needed it.
  289.  
  290.            * A CONTROL-C from  the Shell that SynCro  was started from
  291.              will now stop it dead in its tracks.
  292.  
  293.        - Once more, several modifications have been made to the error-
  294.          specific return codes.  Please  refer to chapter 2.3 for more
  295.          information.
  296.  
  297.